import re

text = "[completed compiling 0x10a9001b4375 <JSFunction modoc_105 (sfi = 0x10a9001b4109)> (target TURBOFAN) filename: /home/sun/work/arkts/ohcompiler-daily/v8/src/app_preheat_modified/modoc.js, codesize: 260 byte,  - took 0.011, 0.236, 0.003 ms]"
text1 = "[completed compiling 0x10a9001b4375 <JSFunction modoc_105 (sfi = 0x10a9001b4109)> (target TURBOFAN) filename: /home/sun/work/arkts/ohcompiler-daily/v8/src/app_preheat_modified/shimo/modoc.js, codesize: 260 byte,  - took 0.011, 0.236, 0.003 ms]"
text2 = "[completed compiling 0x10a9001b4375 <JSFunction modoc_105 (sfi = 0x10a9001b4109)> (target TURBOFAN) filename: /home/sun/work/arkts/ohcompiler-daily/v8/src/app/shimo/modoc.js, codesize: 260 byte,  - took 0.011, 0.236, 0.003 ms]"
text3 = "[completed compiling 0x10a9001b4375 <JSFunction modoc_105 (sfi = 0x10a9001b4109)> (target TURBOFAN) filename: /home/sun/work/arkts/ohcompiler-daily/v8/src/weekly_abc/shimo/modoc.js, codesize: 260 byte,  - took 0.011, 0.236, 0.003 ms]"

pattern = r'<JSFunction ([^ ]+) \(sfi = [^>]+\)>.*filename:.*(?:app|third_lib_js|weekly)[^/]*/(.*?)(?:/|\.).*codesize: (\d+) byte,  - took ([\d., ]+) ms'
#pattern = r"app_preheat_modified/(.*?)(?:/|\.(.+))"
print(re.search(pattern, text).groups())
print(re.search(pattern, text1).groups())
print(re.search(pattern, text2).groups())
print(re.search(pattern, text3).groups())
